package com.fjnu.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @desc:
 * @author:
 * @date:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@Component
@Scope("singleton") // 单例模式
public class User {
    /**
     * todo: 补充完成User的各属性，尤其User关联的多roles属性
     */
    private String userId;
    private String username;
    private String password;
    private String salt;
    private String nickname;
    private String email;
    private String phone;
    private Integer sex;
    private Integer age;
    private String img;
    private Integer status;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private LocalDateTime lastLoginTime;
    private List<Role> roles;
}
